
import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter,Route} from 'react-router-dom'//新版本更新
import App from './App';
import Account from './views/account'
import Count from './views/count'
import Info from './views/info'
import Reaccount from './views/reaccount'
import State from './views/state'

//关键步骤
const Root=()=>(
        
              <BrowserRouter>
                    <App>
                        <Route path="/" exact component={Count}/>
                        <Route path='/account' component={Account}></Route>
                        <Route path='/state' component={State}></Route>
                        <Route path='/reaccount' component={Reaccount}></Route>
                        <Route path='/info' component={Info}></Route>
                    </App>  
                </BrowserRouter>
          
)
ReactDOM.render( <Root/>, document.getElementById('root'));
